<h3>订单列表</h3>
<%= will_paginate(@orders) %>
<br/>
<table>
  <tr>
    <th>ID</th>
    <th>用户</th>
    <th>邮箱</th>
    <th>电话</th>
    <th>收货人</th>
    <th>收货地址</th>
    <th>邮编</th>
    <th>订单状态</th>
     <th>时间</th>
  </tr>

<% for order in @orders %>
  <tr>
    <td><%=order.id %></td>
    <td><%=h order.user.login %></td>
    <td><%=h order.email %></td>
    <td><%=h order.phone_number %></td>
    <td><%=h order.ship_to_name %></td>
    <td><%=h order.ship_to %></td>
    <td><%=h order.ship_to_code %></td>
    <td><%=h order.status %></td>
    <td><%=order.created_at.localtime.to_s(:db) %></td>
    <td><%= link_to '订单详情',list_items_orders_path(:id=>order.id),:popup=>['new_window_name', 'height=400,width=500,scrollbars=yes,resizable=yes,top=200,left=400'] %></td>
    <td><%= link_to '编辑状态', edit_order_path(order) %></td>
    <td><%= link_to '删除', order, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />


